<?php


namespace app\home\controller;


use app\utils\Response;

class SystemController extends ApiBase
{
    // 获取系统信息
    public function info()
    {
        $table = db('system');
        $info = $table->where([
            'id' => 1
        ])->field(['name', 'domain', 'logo', 'copyright', 'bah', 'ads', 'tel', 'email'])->find();
        $info['logo'] = env('DOMAIN_PATH') . $info['logo'];
        Response::success([
            'info' => $info
        ]);
    }
}